# import pymysql
#
# from pymysql.cursors import DictCursor
# conn = pymysql.Connect(
#     host='127.0.0.1',
#     port=3306,
#     user='root',
#     password='123456',
#     db='test_01',
#     charset='utf8',
#     cursorclass=pymysql.cursors.DictCursor
# )
# cursor = conn.cursor()
# sql = 'select * from student;'
# cursor.execute(sql)
# data = cursor.fetchall()
# print(data)
# print(type(data))
# print(data[0].get('sname'))
# cursor.close()
#
# conn.close()

